#ifndef FEEDITEM_H
#define FEEDITEM_H

#include "blogitem.h"
#include "feedrss.h"
#include <QDomElement>

class FeedItem : public BlogItem
{
public:
    FeedItem(const FeedRSS& feedRSS, QSettings* settings = NULL);
    FeedItem(const QDomElement& elt, QSettings* settings = NULL);

    //Default processing method (update)
    virtual void defaultProcessing();

    //Update method : get new mp3s
    void update();

    //Pas sur qu'il faille les mettre en public --> private?

    //Getters / Setters
    int     getProcessingStatus() const;
    void    setProcessingStatus(int status);
    QDate   getLastUpdate() const;

    //Static processing status
    static const int idle = 1;
    static const int downloading = 2;
    static const int processing = 3;
    static const int error = 0;

    //To XML
    QDomElement toDomElt();

protected:
    void addSong(Mp3Item song);

private:
    int     _processingStatus;
    QDate   _lastUpdate;
};
#endif // FEEDITEM_H
